import axios from "./axios"

export default {
    // 管理员登录
    adminLogin: (data) => {
        return axios({
            method: "post",
            url: "admin/login",
            data
        })
    },

    // 管理员退出登录
    adminLoginOut: (data) => {
        return axios({
            method: "post",
            url: "admin/loginOut",
            data
        })
    },

    // 获取企业列表
    getcompanylist: (data) => {
        return axios({
            method: "get",
            url: "company/list",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "companyName": data.companyName
            }
        })
    },

    // 获取用户列表
    getuserlist: (data) => {
        return axios({
            method: "get",
            url: "user/list",
            params: {
                "pageNo": data.pageNo,
                "pageSize": data.pageSize,
                "userName": data.userName
            }
        })
    },

    // 删除企业列表
    deletecompanylist: (id) => {
        return axios({
            method: "delete",
            url: `admin/delete/company/${id}`,
        })
    },

    // 删除用户列表
    deleteuserlist: (id) => {
        return axios({
            method: "delete",
            url: `admin/delete/user/${id}`,
        })
    },
}